package com.xxxx.common.enums;

/**
 * 使用枚举类的好处：
 * 1、提升代码的阅读性，避免硬编码
 * 2、
 */
public enum  BaseResultEnum {
    SUCCESS(200,"成功"),
    ERROR(400,"失败"),
    PASS_ERROR_01(501,"两次输入的密码不一致"),
    PASS_ERROR_02(502,"输入的原始密码不正确"),
    PASS_ERROR_03(503,"输入的验证码不正确"),
    PASS_ERROR_04(504,"用户名或者密码错误");

    private Integer code;
    private String messags;

    @Override
    public String toString() {
        return "BaseResultEnum{" +
                "code=" + code +
                ", messags='" + messags + '\'' +
                '}';
    }

    BaseResultEnum() {
    }

    BaseResultEnum(Integer code, String messags) {
        this.code = code;
        this.messags = messags;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessags() {
        return messags;
    }

    public void setMessags(String messags) {
        this.messags = messags;
    }
}
